#include <stdio.h>
#include <assert.h>

#define SIZE 50

char *find_char(char const *source, char const *chars);

int 
main()
{
	char source[SIZE], chars[SIZE];

	printf("Input source chars and destination cahrs:\n");
	scanf("%s%s", source, chars);

	printf("source :%s\n", source);
	printf("chars :%s\n", chars);

	char *p = NULL;
	p = find_char(source, chars);

	if (p == NULL)
		printf("There are no chars been matched!\n");
	else
		printf("There are some chars bend matched!\n");
	return 0;

}

char *find_char(char const *source, char const *chars)
{	
	assert(source != NULL && chars != NULL);

	char *src, *dst = NULL;
	
	dst = chars;
	while(*dst != '\0') {
		src = source;
		while (*src != '\0') {
			if (*dst == *src) 
				return src;
			else 
				src++;
		}
		dst++;
	}
	return NULL;
}